package com.weirong.smartvault.dao;

import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.repository.PagingAndSortingRepository;
import org.springframework.stereotype.Repository;

import com.weirong.smartvault.entity.Department;

import java.util.List;

@Repository
@Qualifier("departmentRepository")
public interface DepartmentRepository extends JpaRepository<Department, Integer> {

    public List<Department> findAllByType(String type);

    List<Department> findAllByManagedBy(Integer id);
}
